package org.jg.arkanoid.ui;

import javax.swing.JFrame;
import javax.swing.JPanel;

public class MainFrameView extends JFrame 
{
	private static final long serialVersionUID = 1L;
	private MainFrameData sourceData;
	private JPanel panel;
	
	
	public MainFrameView( MainFrameData sourceData )
	{
		this.sourceData = sourceData;
		
		this.setSize(sourceData.getSCREEN_WIDTH(), sourceData.getSCREEN_HEIGHT());
		this.setResizable(false);
		addKeyListener(sourceData.getKeyBoardListener());
	}

	public JPanel getPanel() {
		return panel;
	}

	public void setPanel(JPanel panel) {
		this.panel = panel;
		add(panel);
	}
}
